package com.friend.chat.service

import android.app.Service
import android.content.Intent
import android.os.IBinder
import com.friend.chat.websocket.WebSocketManager


/**
 * @des
 * @author batie fancy
 * @date 2023/1/4
 */
class WebsocketService: Service() {


    override fun onBind(intent: Intent?): IBinder? {
     return null
    }

    //修改onStartCommand(..)方法的返回值为START_STICKY可实现停止服务之后重启服务
    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        return START_STICKY
    }

    override fun onCreate() {
        super.onCreate()
        WebSocketManager.instance.initClient()
    }



}